#ifndef ADSPAUDIO
#define ADSPAUDIO 1

using namespace std;
class adspAudio
{
  public:
    adspAudio();    
    void importFromWAV(string filename);  // only import from WAV PCM supported    
    void exportToWAV(string filename);
    void changeVolume(float volume);
    void mixAudio(double ** data1, double ** data2, int duration1, int duration2, int numChannel1, int numChannel2);
    void export_csv(string filename);
    bool error();
    void clearError();
    double ** getData();
    int getDuration();
    int getNumChannels();
    int getSampleRate();
    int getDurationLength();
    
  private:
    int i;
    int j;
    int filesize;
    int SubChunk1Size;
    int AudioFormat;
    int NumChannels;
    int SampleRate;
    int ByteRate;
    int BlockAlign;
    int BitsPerSample;
    int BytesPerSample;
    int SubChunk2Size;   
    int duration;
    int durationLength;
    bool fail;  
    double ** data; 
    char * wavheader;
    int chunkoffset;       
};

#endif
